package com.ruoyi.system.domain;

import cn.hutool.core.date.DateUtil;
import com.ruoyi.common.utils.ShiroUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.List;

/**
 * knowledgepool对象 knowledgepool
 *
 * @author ruoyi
 * @date 2023-08-22
 */
public class Knowledgepool extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    private Long id;

    /**
     * 标题
     */
    @Excel(name = "标题")
    private String title;

    /**
     * 内容
     */
    @Excel(name = "内容")
    private String content;

    /**
     * 评论数
     */
    @Excel(name = "评论数")
    private Long commentCount;

    /**
     * 收藏数
     */
    @Excel(name = "收藏数")
    private Long collectionCount;

    /**
     * 作者
     */
    @Excel(name = "作者")
    private String author = ShiroUtils.getSysUser().getUserName();

    /**
     * 作者id
     */
    @Excel(name = "作者id")
    private Long uid = ShiroUtils.getUserId();

    /**
     * 性别1：男 2：女
     */
    @Excel(name = "性别1：男 2：女")
    private Long sex = Long.valueOf(ShiroUtils.getSysUser().getSex());

    /**
     * 创建时间
     */
    @Excel(name = "创建时间")
    private String creatTime = DateUtil.now();

    /**
     * 最近一次修改时间
     */
    @Excel(name = "最近一次修改时间")
    private String lastTime = DateUtil.now();

    /**
     * 关键词
     */
    @Excel(name = "关键词")
    private String keyword;

    /**
     * 审核状态 未审：0 已审：1
     */
    @Excel(name = "审核状态 未审：0 已审：1")
    private Long isAudit;

    /**
     * 点赞数
     */
    @Excel(name = "点赞数")
    private Long likeCount;

    /**
     * 浏览次数
     */
    @Excel(name = "浏览次数")
    private Long pageViews;

    /**
     * 用户权限
     */
    @Excel(name = "用户权限")
    private Long userPower;

    /**
     * 用户部门
     */
    @Excel(name = "用户部门")
    private String dept;

    /**
     * 类型1：文本 2：文件
     */
    @Excel(name = "类型1：文本 2：文件")
    private Long type;

    /**
     * 姓名首字母
     */
    @Excel(name = "姓名首字母")
    private String firstPinYin;

    public String getPermissionType() {
        return permissionType;
    }

    public void setPermissionType(String permissionType) {
        this.permissionType = permissionType;
    }

    /**
     * 文章查看标识
     */
    @Excel(name = "文章权限标识")
    private String permissionType;

    private Long userId = ShiroUtils.getUserId();

    private Long deptId = ShiroUtils.getSysUser().getDeptId();

    private String url;
    private String fileName;
    private String newFileName;
    private String originalFilename;

    private String ftype;


    public String getDeptList() {
        return deptList;
    }

    public void setDeptList(String deptList) {
        this.deptList = deptList;
    }

    private String deptList;


    private List<String> depIdList;

    public List<String> getDepIdList() {
        return depIdList;
    }

    public void setDepIdList(List<String> depIdList) {
        this.depIdList = depIdList;
    }


    public String getFtype() {
        return ftype;
    }

    public void setFtype(String ftype) {
        this.ftype = ftype;
    }


    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getNewFileName() {
        return newFileName;
    }

    public void setNewFileName(String newFileName) {
        this.newFileName = newFileName;
    }

    public String getOriginalFilename() {
        return originalFilename;
    }

    public void setOriginalFilename(String originalFilename) {
        this.originalFilename = originalFilename;
    }


    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getContent() {
        return content;
    }

    public void setCommentCount(Long commentCount) {
        this.commentCount = commentCount;
    }

    public Long getCommentCount() {
        return commentCount;
    }

    public void setCollectionCount(Long collectionCount) {
        this.collectionCount = collectionCount;
    }

    public Long getCollectionCount() {
        return collectionCount;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getAuthor() {
        return author;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public Long getUid() {
        return uid;
    }

    public void setSex(Long sex) {
        this.sex = sex;
    }

    public Long getSex() {
        return sex;
    }

    public void setCreatTime(String creatTime) {
        this.creatTime = creatTime;
    }

    public String getCreatTime() {
        return creatTime;
    }

    public void setLastTime(String lastTime) {
        this.lastTime = lastTime;
    }

    public String getLastTime() {
        return lastTime;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }

    public String getKeyword() {
        return keyword;
    }

    public void setIsAudit(Long isAudit) {
        this.isAudit = isAudit;
    }

    public Long getIsAudit() {
        return isAudit;
    }

    public void setLikeCount(Long likeCount) {
        this.likeCount = likeCount;
    }

    public Long getLikeCount() {
        return likeCount;
    }

    public void setPageViews(Long pageViews) {
        this.pageViews = pageViews;
    }

    public Long getPageViews() {
        return pageViews;
    }

    public void setUserPower(Long userPower) {
        this.userPower = userPower;
    }

    public Long getUserPower() {
        return userPower;
    }

    public void setDept(String dept) {
        this.dept = dept;
    }

    public String getDept() {
        return dept;
    }

    public void setType(Long type) {
        this.type = type;
    }

    public Long getType() {
        return type;
    }

    public void setFirstPinYin(String firstPinYin) {
        this.firstPinYin = firstPinYin;
    }

    public String getFirstPinYin() {
        return firstPinYin;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("title", getTitle())
                .append("content", getContent())
                .append("commentCount", getCommentCount())
                .append("collectionCount", getCollectionCount())
                .append("author", getAuthor())
                .append("uid", getUid())
                .append("sex", getSex())
                .append("creatTime", getCreatTime())
                .append("lastTime", getLastTime())
                .append("keyword", getKeyword())
                .append("isAudit", getIsAudit())
                .append("likeCount", getLikeCount())
                .append("pageViews", getPageViews())
                .append("userPower", getUserPower())
                .append("dept", getDept())
                .append("type", getType())
                .append("firstPinYin", getFirstPinYin())
                .toString();
    }
}
